package com.kuizii.base.common;

import com.kuizii.base.common.idgenerator.BaseGenerator;
import com.kuizii.base.common.idgenerator.SnowFlakeGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.time.format.DateTimeFormatter;

@Configuration
public class GenTestConfig{

    @Bean
    BaseGenerator baseGenerator2(){
        BaseGenerator baseGenerator=new BaseGenerator();
        baseGenerator.setNodeId(3);
        baseGenerator.setDateTimeFormatter(DateTimeFormatter.ofPattern("HHmmss"));
        return baseGenerator;
    }

    @Bean
    SnowFlakeGenerator snowFlakeGenerator2(){
        SnowFlakeGenerator baseGenerator=new SnowFlakeGenerator();
        baseGenerator.setNodeId(2);
        return baseGenerator;
    }
}